package com.zmxstudy.rbac.controller;

import com.zmxstudy.rbac.base.BaseController;
import com.zmxstudy.rbac.entity.Brand;
import com.zmxstudy.rbac.service.BrandService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * @Author:tianyu
 * @Date:2024-06-05 11:37
 */
@RestController
@RequestMapping("/brand")
public class BrandController extends BaseController<BrandService, Brand> {
    @RequestMapping("/info")
    public ArrayList<Brand> getAllBrand(){
        return baseService.getAllBrand();
    }

    @RequestMapping("/info/{id}")
    public Brand getBrandById(@PathVariable ("id") Integer id){
        return baseService.getBrandById(id);
    }

}
